package com.chuhe.common.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 * @Author: 楚河
 * @Date: 2025-05-12 15:09 
 */
//@Configuration
//public class RedissonConfig {
//    @Autowired
//    private RedisProperties redisProperties;
//    @Bean
//    public RedissonClient redissonClient() {
//        Config config = new Config();
//        config.useSingleServer()
//                .setAddress("redis://" + redisProperties.getHost() + ":" + redisProperties.getPort())
////                .setPassword(redisProperties.getPassword())
//                .setDatabase(redisProperties.getDatabase());
//        return Redisson.create(config);
//    }
//}
